<form action="{:U('user_role_relation','by=user_role')}" method="Post">
<table class="table table-hover">
	<input name="user_id" type="hidden" value="{$user.user_id}"></input>
	<thead>
		<tr>
			<th>{:L('DEPARTMENT')}</th>  
			<th>{:L('POSITION')}</th>
		</tr>
	</thead>
	<tfoot>
		<tr>
			<th colspan="2">
				<input class="btn btn-primary" type="submit" value="{:L('SAVE')}"/> &nbsp;
				<input class="btn" type="button" onclick="javascript:$('#dialog-message').dialog('close');" value="{:L('CANCEL')}"/>
			</th>
		</tr>
	</tfoot>
	<tbody>	  
		<volist name="departmentList" id="vo">
			<tr>
			<td width="30%">{$vo.name}</td>
			<td><volist name="vo.roleList" id="role">
				<input type="checkbox" <if condition="($role['user_id'] neq 0) and ($role['user_id'] neq $user['user_id'])">disabled</if> <if condition="$role['user_id'] eq $user['user_id']">checked</if> name="role[]" value="{$role.role_id}"/> {$role.name} &nbsp; 
			</volist></td>
			</tr>
		</volist> 
	</tbody>
</table>
</form>